#ifndef __WORK_H
#define __WORK_H


#include "main.h"


#define DEFAULT_WORK_TIME 60
#define MAX_WORK_TIME 90
#define MIN_WORK_TIME 30
#define WORK_TIME_STEP 5


#define START_SPEED_PWM 300
#define LOW_SPEED_PWM 	500
#define MID_SPEED_PWM 	700
#define HIGH_SPEED_PWM 	900


#define POWER_DELAY 1000

#define ERR_WORK_TEMP 200
#define MAX_WORK_TEMP 30
#define MIN_WORK_TEMP 0

#define CHECK_TEMP 1

typedef enum
{
	MODE_NORMAL=0,
	MODE_STEP=1,
}WORK_MODE;

typedef enum
{
	SPEED_LOW=0,
	SPEED_MID=1,
	SPEED_HIGH=2,
}WORK_SPEED;

typedef enum
{
	GROUP_2X=0,
	GROUP_4X,
}WORK_GOUP;

typedef struct
{
	uint8_t group_21;
	uint8_t group_22;
	uint8_t group_23;
	uint8_t group_24;
	uint8_t group_41;
	uint8_t group_42;
}GROUP_STATE;

typedef enum
{
	STOP=0,
	RUN=1
}WORK_STATE;



typedef struct
{
	WORK_MODE work_mode;
	WORK_SPEED work_speed;
	uint8_t work_time;
	WORK_GOUP work_group;
	GROUP_STATE group_state;
	WORK_STATE work_state;
}WORK;
extern WORK work;















void work_init();
void Clear_All_Clickable_Flag();
void Add_All_Clickable_Flag();
void work_grind();


#endif
